
from __future__ import unicode_literals
from django.db import models
from optitrans.domain.device import Device
from optitrans.domain.vehicule import Vehicule
class Arret(models.Model):
    id = models.IntegerField(primary_key=True)
    id_device = models.ForeignKey(Device, db_column='id_device',related_name='device_set')
    uuid = models.CharField(max_length=64L)
    start_time = models.DateTimeField()
    end_time = models.DateTimeField()
    latitude = models.FloatField()
    longitude = models.FloatField()
    id_vehicule = models.ForeignKey(Vehicule, db_column='id_vehicule',related_name='vehicule_set')
    id_chauffeur = models.IntegerField()
    duree = models.IntegerField()
    class Meta:
        db_table = 'arret'


